home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 May / CHIP Mayıs 1997.iso / cont / web / winsock / virc / vircdde.txt < prev    next >
Encoding:
Text File  |  1997-01-20  |  1.7 KB  |  56 lines

  1. Visual IRC '96's DDE interface (0.65 and above)
  2. ===============================================
  3.  
  4. IMPORTANT NOTE!! This has changed EXTENSIVELY in 0.65. Your old DDE stuff
  5. will not work.
  6.  
  7. ViRC '96 currently supports two types of DDE requests: IRC_ParseVars and
  8. IRC_Execute. IRC_ParseVars evaluates an expression, parsing the variables
  9. and functions out, and IRC_Execute causes ViRC '96 to execute an IRC
  10. command as if it were typed at the keyboard. Thus "front-end" programs can
  11. be written to control ViRC '96. This is, of course, a very powerful
  12. capability.
  13.  
  14. Usage examples
  15. --------------
  16.  
  17. The examples provided are written in Visual Basic, however, the technique
  18. is very simple and is easy to do in Delphi or C++ too.
  19.  
  20. IRC_ParseVars
  21. ---------
  22.  
  23. Create a label on a VB form and call it txDDE. Then execute the following
  24. code:
  25.  
  26.   txDDE.LinkTopic = "VIRC96|DDE"
  27.   txDDE.LinkItem = "IRC_ParseVars"
  28.   txDDE.LinkMode = 1
  29.   txDDE.LinkExecute "$rand(100)"
  30.  
  31. The will parse the text $rand(100), returning a random number between 0 and
  32. 99, and setting the caption of txDDE to the returned random number.
  33.  
  34. You can return the value of any text, for example, you could use the
  35. following code:
  36.  
  37.   txDDE.LinkTopic = "VIRC96|DDE"
  38.   txDDE.LinkItem = "IRC_ParseVars"
  39.   txDDE.LinkMode = 1
  40.   txDDE.LinkExecute "My nickname is $N."
  41.  
  42. This would return the string "My nickname is <your nickname>".
  43.  
  44. IRC_Execute
  45. -----------
  46.  
  47. Causes ViRC '96 to execute an IRC command, as if it were entered at the
  48. keyboard. Example:
  49.  
  50.   txDDE.LinkTopic = "VIRC96|IRC_Execute"
  51.   txDDE.LinkMode = 2
  52.   txDDE.LinkExecute "Join #quake"
  53.  
  54. This will make ViRC '96 join the channel #quake. Any valid IRC command
  55. may be placed in the LinkExecute field.
  56.